﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Media.Animation;
namespace Corona
{
    public class ResourceIcon : Icon, Corona.TagPresent.Resource
    {
        public ResourceIcon()
            : base()
        {
            this.BaseMouseClick += new BaseMouseClickHandler(ResourceIcon_BaseMouseClick);
        }

        public ResourceIcon(String TitleValue, String ImageValue)
            : base(TitleValue, ImageValue)
        {
            this.BaseMouseClick += new BaseMouseClickHandler(ResourceIcon_BaseMouseClick);
        }

        public ResourceIcon(double height, double width)
            : base(height, width)
        {
            this.BaseMouseClick += new BaseMouseClickHandler(ResourceIcon_BaseMouseClick);
        }

        public ResourceIcon(double height, double width, double x, double y)
            : base(height, width, x, y)
        {
            this.BaseMouseClick += new BaseMouseClickHandler(ResourceIcon_BaseMouseClick);
        }

        public ResourceIcon(String TitleValue, String ImageValue, double height, double width)
            : base(TitleValue, ImageValue, height, width)
        {
            this.BaseMouseClick += new BaseMouseClickHandler(ResourceIcon_BaseMouseClick);
        }


        #region Resource Members

        public string ResourceName
        {
            get
            {
                return this.Title;
            }
            set
            {
                this.Title = value;
            }
        }

        public string resourceString
        {
            get
            {
                return resourceString;
            }
            set
            {
                resourceString = value;
            }
        }

        #endregion
        public event EventHandler<Corona.TagPresent.ResourceEventArgs> MouseClick;
        void ResourceIcon_BaseMouseClick(object sender)
        {
            if (MouseClick != null)
                MouseClick(this, new Corona.TagPresent.ResourceEventArgs(sender as Corona.TagPresent.Resource));
        }
    }
}
